Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1575 add pv model #1766

Open
wants to merge 163 commits into
base: master
Choose a base branch
from
Open

Issue1575 add pv model #1766

wants to merge 163 commits into from

Conversation

LauraMaier
Copy link
Contributor

This closes #1575

We added a new PV model to the IBPSA library.
The model has the following characteristics:

  • The model is based on two different approaches for the I-V- characteristic: a single- and two-diode approach.
  • We included three modeling approaches to calculate the cell temperature depending on the PV mounting: open rack, close-to-ground, and in-contact-with-ground
  • The model was validated using measurement data from a rooftop PV system in Berlin, Germany. Further information can be found here: http://www.solar-rooftop.de

LauraMaier and others added 30 commits June 13, 2022 12:12
@LauraMaier LauraMaier requested a review from mwetter December 13, 2023 12:16
@LauraMaier
Copy link
Contributor Author

@mwetter All change requests were adressed. Please re-review.

Copy link
Contributor

@mwetter mwetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LauraMaier : Pleae see the inline comment for the required changes. I still need to run the model (which fail in Dymola 2024x and Optimica, see inline comment for the cause).

The Lambert W function solves mathematical equations in which the unknown is both inside and outside of an exponential function or a logarithm.
</p>
<p>
This function is a simple approximation for Lambert W function following Baetzelis, 2016:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The citation for Baetzelis is missing.

info=
"<html>
<p>
The model computes the air mass, which is the number of particles in the atmosphere.</br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The air mass is not equal to the number of particles in the atmosphere.

"<html>
<p>
The model computes the air mass, which is the number of particles in the atmosphere.</br>
It is based on an exact empirical approach by Kasten et al. and bases on the zenith angle of the object as well as its height.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach is either empirical (which is here the case) or exact, but not both.

Comment on lines +45 to +46
airMasMod =if (b0 + b1*(airMas^1) + b2*(airMas^2) + b3*(airMas^3) + b4*(airMas^4)) <=
0 then 0 else b0 + b1*(airMas^1) + b2*(airMas^2) + b3*(airMas^3) + b4*(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the exponent ^1, and use regularization which avoids a time or state event, and it makes the model having a continuous derivative (which is important for NLP).

Comment on lines +73 to +94
HGloHor=realPassThroughHGloHor.y;

solHouAng = realPassThroughSolHouAng.y;
solDec=realPassThroughSolDec.y;
cloTim=realPassThroughCloTim.y;

k_t =if HGloHor <= 0.01
then 0
else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*
(cos(lat)*cos(solDec)*cos(solHouAng) + sin(lat)*sin(solDec)))))))
"Factor needed for Erbs diffuse fraction relation";

// Erbs diffuse fraction relation
HDifHor = if HGloHor <= 0.01
then 0
elseif k_t <= 0.22
then (HGloHor)*(1.0 - 0.09*k_t)
elseif k_t > 0.8
then (HGloHor)*0.165
else (HGloHor)*
(0.9511 - 0.1604*k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these assignments in the variable declaration so that we don't mix connect statements with assignments, and use regularization (also as it is only an example, regularization is less critical here).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also upload the svg file so that changes can be made.

parameter Integer nPar "Number of parallel cell circuits on the PV panel"
annotation(Dialog(group="General"));
parameter Modelica.Units.SI.Area ACel
"Area of a single cell. If not found in data sheet, use ACel = ((V_mp0*I_mp0)/(1000*eta_0))/n_ser"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is not clear, where should V_mp0 (and other parameters) be obtained? Also, I think you mean nSer.
Maybe such instructions would be better in the info section.

extends IBPSA.Electrical.Data.PV.Generic;

parameter Modelica.Units.SI.Efficiency eta0
"Efficiency under standard conditions. If not found in data sheet, use eta_0 = ((V_mp0*I_mp0)/(1000*A_cel*n_ser))"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in above file, and use the right variable names.

parameter Modelica.Units.SI.Voltage VMP0
"MPP voltage under standard conditions"
annotation (Dialog(group="Cell specific: Electrical characteristics"));
parameter Real C
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this have a unit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add simplified PV system model based on 5p analytical modeling approach
4 participants